home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / ablood1a / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-10-11  |  4.2 KB  |  155 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   4440
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   6525
  10.    DrawWidth       =   15
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4440
  13.    ScaleWidth      =   6525
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16.    WindowState     =   2  'Maximized
  17. Attribute VB_Name = "Form1"
  18. Attribute VB_GlobalNameSpace = False
  19. Attribute VB_Creatable = False
  20. Attribute VB_PredeclaredId = True
  21. Attribute VB_Exposed = False
  22. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  23. 'Blood Shot Screen Saver v1.0
  24. 'Author: Dustin Davis
  25. 'Bootleg Software Inc.
  26. 'http://www.warpnet.org/bsi
  27. 'This program and its code was ALL, and I mean EVERY LINE was written from
  28. 'scratch by me. If someone else has done something like this, I have not seen it
  29. 'and that is why i made this one! It is not set up to be in screen saver
  30. 'format yet, but all it takes is a few adjustments. Feel free to edit it
  31. 'to your taste. Yes, I know its kind of cheesy, but hey, i was bored!
  32. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  33. Dim bSize As Long
  34. Dim Counter As Integer
  35. Dim sound As Boolean
  36. Dim X As Long
  37. Dim Y As Long
  38. Dim Go As Boolean
  39. Private Sub Form_Activate()
  40. 'starts the show!
  41. Call Blood_Stream
  42. End Sub
  43. Private Sub Form_Click()
  44. Go = False 'exits
  45. End Sub
  46. Public Sub Blood_Stream()
  47. 'draws the blood stream
  48. Dim i As Long
  49. Dim j As Long
  50. Randomize
  51. i = 3
  52. j = 3
  53. Go = True
  54. X = 0
  55. Y = 0
  56.     Randomize
  57.     check_border 'check to see if a new shot should be fired!
  58.     DoEvents
  59.     i = (Rnd * 3)
  60.     If i = 1 Then
  61.         Y = (Y - (i * 4))
  62.         PSet (X, Y), RGB(250, 0, 0)
  63.     ElseIf i = 2 Then
  64.         Y = (Y + (i * 4))
  65.         PSet (X, Y), RGB(250, 0, 0)
  66.     Else
  67.         PSet (X, Y), RGB(240, 4, 4) 'this gives it a more realistic look
  68.     End If
  69.     Randomize
  70.     DoEvents
  71.     j = (Rnd * 3)
  72.     If j = 1 Then
  73.         X = (X + (i * 4))
  74.         PSet (X, Y), RGB(250, 0, 0)
  75.     ElseIf j = 2 Then
  76.         X = (X - (i * 4))
  77.         PSet (X, Y), RGB(250, 0, 0)
  78.     Else
  79.         PSet (X, Y), RGB(240, 4, 4) 'this gives it a more realistic look
  80.     End If
  81. Randomize
  82. Loop Until Go = False
  83. Unload Me
  84. End Sub
  85. Public Sub check_border()
  86. 'this is important. If the blood stream has reached the bootom of the screen, then
  87. 'shot the screen again!
  88. Dim clear As Integer
  89. clear = GetSetting("blood", "settings", "clear", "10")
  90. If X <= 0 Then
  91.         X = (Rnd * Form1.Width)
  92.         Y = (Rnd * Form1.Height)
  93.         
  94.         If Counter = clear Then
  95.             Form1.Cls
  96.             Counter = 0
  97.         Else
  98.             Counter = Counter + 1
  99.         End If
  100.         If sound = True Then
  101.             playwav "gun.wav"
  102.         End If
  103.     ElseIf X >= Form1.Width Then
  104.         X = (Rnd * Form1.Width)
  105.         Y = (Rnd * Form1.Height)
  106.        
  107.        If Counter = clear Then
  108.             Form1.Cls
  109.             Counter = 0
  110.         Else
  111.             Counter = Counter + 1
  112.         End If
  113.         If sound = True Then
  114.             playwav "gun.wav"
  115.         End If
  116.     ElseIf Y <= 0 Then
  117.         X = (Rnd * Form1.Width)
  118.         Y = (Rnd * Form1.Height)
  119.         
  120.         If Counter = clear Then
  121.             Form1.Cls
  122.             Counter = 0
  123.         Else
  124.             Counter = Counter + 1
  125.         End If
  126.         If sound = True Then
  127.             playwav "gun.wav"
  128.         End If
  129.     ElseIf Y >= Form1.Height Then
  130.         X = (Rnd * Form1.Width)
  131.         Y = (Rnd * Form1.Height)
  132.         
  133.         If Counter = clear Then
  134.             Form1.Cls
  135.             Counter = 0
  136.         Else
  137.             Counter = Counter + 1
  138.         End If
  139.         
  140.         If sound = True Then
  141.             playwav "gun.wav"
  142.         End If
  143.     End If
  144. End Sub
  145. Private Sub Form_DblClick()
  146. Form2.Visible = True 'show settings
  147. End Sub
  148. Private Sub Form_Load()
  149. 'load all the settings
  150. sound = GetSetting("blood", "settings", "sound", "true")
  151. size = GetSetting("blood", "settings", "size", "20")
  152. Form1.DrawWidth = size 'sets the size of the blood stream
  153. Counter = 0
  154. End Sub
  155.